package com.example.shardingjdbcdemo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("t_order")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Order {
    @TableId(type = IdType.ASSIGN_ID) // 使用分布式ID
    private Long orderId;
    private Long userId;
    private String orderNo;
    private BigDecimal amount;
    private Date createTime;
}